<template>
  <view class="view">
    <text>按钮示例</text>
    <u-button class="btn" @click="showDangerTips" type="error" ripple>错误提示</u-button>
    <!-- 全局提示组件, 与 tipsMixin 配合使用 -->
    <GlobalTips ref="globalTips" />
  </view>
</template>

<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
// 与组件 global-tips 配合使用
import tipsMixin from '@/mixins/tipsMixin'

@Component
export default class Uview extends Mixins(tipsMixin) {
}
</script>

<style lang="scss" scoped>
.view {
  display: flex;
  flex-wrap: wrap;
  padding: 20rpx;
  text {
    margin-bottom: 40rpx;
  }
  .btn {
    flex: 0 0 100%;
    margin-bottom: 20rpx;
  }
}
</style>
